<{include file="header.html"}>
<!--[if IE]><script language="javascript" type="text/javascript" src="themes/js/flot/excanvas.min.js"></script><![endif]-->
<script language="javascript" type="text/javascript" src="themes/js/flot/jquery.min.js"></script>
<script language="javascript" type="text/javascript" src="themes/js/flot/jquery.flot.min.js"></script>
<script language="javascript" type="text/javascript" src="themes/js/flot/jquery.flot.pie.min.js"></script>
<script language="javascript" type="text/javascript" src="themes/js/SetTableBgColor.js"></script>
<div id="container">
	<div id ="c_title">
		<h2><{$user.username}>欢迎您回来</h2>
		<span>最近访问时间:<{$user.lasttime}></span>
		<div class = "clear"></div>
	</div>
	<div id ="pie" class="round">		
		<div class="title">
			<span>站点监控状态统计&nbsp;&nbsp;<{$fault}>&nbsp;/&nbsp;<{$normal}></span>
			<A href="<{spUrl c=main a=detection}>">所有监控项目</A>
			<div class ="clear"></div>
		</div>		
		<div id ="aaaccc">loading</div>
	</div>
	
	<div id="site" class="round">
		<div class="title">
			<span>当前状态</span>			
			<div class ="clear"></div>
		</div>
		<table width="900" border="0" align="center"  cellpadding="0" cellspacing="1" id="table1">
			<tr id="tt" style="height:30px;">
					<td width="200">名称：</td>
					<td width="200">网址：</td>
					<td width="200">状态：</td>
					<td width="200">详情：</td>
			</tr>
			<{foreach item=vo from=$list key=enname}>
			<tr >
					<td width="200" ><{$vo.title}></td>
					<td width="200" ><{$vo.domain}></td>	
					<td width="200"><{if $vo.status_code == "200"}>正常<{else}><span style="color: #F00">故障</span><{/if}></td>
					<td width="200"><a href= "<{spUrl c=main a=record siteid=$vo.siteid title=$vo.title domain=$vo.domain}>">详情</a></td>
			</tr>
			<{/foreach}>
		</table>
<{if $pager}>
共有记录<{$pager.total_count}>条，共有<{$pager.total_page}>页（每页<{$pager.page_size}>条记录）：
<!--在当前页不是第一页的时候，显示前页和上一页-->
<{if $pager.current_page != $pager.first_page}>
<a href="<{spUrl c=main a=site page=$pager.first_page}>">前页</a> | 
<a href="<{spUrl c=main a=site page=$pager.prev_page}>">上一页</a> | 
<{/if}>
<!--在当前页不是最后一页的时候，显示下一页和后页-->
<{if $pager.current_page != $pager.last_page}> | 
<a href="<{spUrl c=main a=site page=$pager.next_page}>">下一页</a> | 
<a href="<{spUrl c=main a=site page=$pager.last_page}>">后页</a>
<{/if}>
<{/if}>
	<br><br>
	</div>
</div>

<div id="sidebar">
	<div class = "box">
		<div class ="title">
			<span>尊敬的<{$user.username}>欢迎您！</span>
		</div>
		<{$notice}>
	</div>
	<div class = "box">
		<div class ="title">
			<span>栏目二</span>
		</div>
	</div>
</div>
<div class ="clear"></div>

<script type="text/javascript">
$(function () {
var data = [
	{ label: "故障",  data: <{$fault}>, color: 12},
	{ label: "正常",  data: <{$normal}>,color: 3}
];
$.plot($("#aaaccc"), data, 
		{
		        series: {
		            pie: { 
		                show: true,
		                radius: 1,
		                tilt: 0.5,
		                label: {
		                    show: true,
		                    radius: 1,
		                    formatter: function(label, series){
		                        return '<div style="font-size:8pt;text-align:center;padding:2px;color:white;">'+label+'<br/>'+Math.round(series.percent)+'%</div>';
		                    },
		                    background: { opacity: 0.8 }
		                },
		                combine: {
		                	label: "故障",
		                    color: '#F00',
		                    threshold: 0.1
		                }
		            }
		        },
		        legend: {
		            show: false
		        }
		});
});

$(function(){ 

	//自定义类，给定值； 
	$("#table1").SetTableBgColor({ 
	odd:"odd1", 
	even:"even1", 
	selected:"mselected" 
	}).find("th").css("font-size","18"); 
	}) 

</script>
<{include file="footer.html"}>